﻿/*
 *  Author: Louis A. Leskoviansky
 *  Company: Artemis Solutions Group (http://www.artemis-solutions.com)
 */


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AjaxControlFramework
{
    [AttributeUsage(AttributeTargets.Class)]
    public class AjaxControlControlsAttribute : Attribute
    {
        //------// Properties \\--------------------------------------------\\
        public virtual string[] ControlIDs { get; set; }


        private bool _autoDetect = false; // default value
        public virtual bool AutoDetect
        {
            get { return _autoDetect; }
            set { _autoDetect = value; }
        }


        private bool _searchChildren = true; // default value
        public virtual bool SearchChildren
        {
            get { return _searchChildren; }
            set { _searchChildren = value; }
        }
        //------\\ Properties //--------------------------------------------//



        //------// Constructors \\------------------------------------------\\
        public AjaxControlControlsAttribute() { }


        public AjaxControlControlsAttribute(params string[] controlIDs)
        {
            ControlIDs = controlIDs;
        }

        public AjaxControlControlsAttribute(bool searchChildren, params string[] controlIDs)
        {
            SearchChildren = searchChildren;
            ControlIDs = controlIDs;
        }


        public AjaxControlControlsAttribute(bool autoDetect)
        {
            AutoDetect = autoDetect;
        }


        public AjaxControlControlsAttribute(bool autoDetect, bool searchChildren)
        {
            AutoDetect = autoDetect;
            SearchChildren = searchChildren;
        }


        public AjaxControlControlsAttribute(bool autoDetect, bool searchChildren, params string[] controlIDs)
        {
            AutoDetect = autoDetect;
            SearchChildren = searchChildren;
            ControlIDs = controlIDs;
        }
        //------\\ Constructors //------------------------------------------//



        //------// Methods \\-----------------------------------------------\\

        //------\\ Methods //-----------------------------------------------//
    }
}
